﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package Display {
    import org.aswing.*;
    import org.aswing.ext.*;
    import Display.aswingui.*;

    public class ASwingScrollingList extends JPanel {

        public static const SCROLL_VERTICAL:int = 0;
        public static const SCROLL_HORIZONTAL:int = 1;

        private var m_dataList:GridList;
        private var m_scrollPane:JScrollPane;
        private var m_cellFactory:GridListCellFactory;
        private var m_frame:JWindow;

        public function ASwingScrollingList(_arg1:Array, _arg2:GridListCellFactory, _arg3:int, _arg4:int=0, _arg5:int=2, _arg6:int=100, _arg7:int=100, _arg8:Boolean=true){
            super(new SoftBoxLayout(SoftBoxLayout.X_AXIS, 1, SoftBoxLayout.CENTER));
            ASwingHelper.prepare(this);
            this.m_cellFactory = _arg2;
            var _local9:VectorListModel = new VectorListModel();
            var _local10:int;
            while (_local10 < _arg1.length) {
                _local9.append(_arg1[_local10]);
                _local10++;
            };
            this.m_dataList = new GridList(_local9, this.m_cellFactory, _arg4, _arg5, _arg8);
            this.m_dataList.setHGap(2);
            this.m_dataList.setVGap(2);
            this.m_scrollPane = new JScrollPane(this.m_dataList);
            this.m_scrollPane.setPreferredHeight(_arg7);
            this.m_scrollPane.setPreferredWidth(_arg6);
            this.append(this.m_scrollPane);
        }
        public function set scrollHPolicy(_arg1:int):void{
            this.m_scrollPane.setHorizontalScrollBarPolicy(_arg1);
        }
        public function set scrollVPolicy(_arg1:int):void{
            this.m_scrollPane.setVerticalScrollBarPolicy(_arg1);
        }

    }
}//package Display 
